<template>
  <div id="app">

   
  <test/>
    
   

    <lz-export-tools
      ref="lzExportTools"
      domain="http://localhost:7001"
      reportId="ff80808174d28d1b0174d43fb7e40001"
      reportName="测试导出"
      @click="exportClick"
    />
    <br />
    <!-- 单选商品start -->
    <a-form-model
      layout="horizontal"
      v-bind="{
        labelCol: { span: 4 },
        wrapperCol: { span: 14 },
      }"
    >
      <a-form-model-item label="选择商品">
        <lz-one-selector
          action="http://localhost:7001/center/pc/serve/goods/category/getList"
          :replaceFields="{
            title: 'cateName,cateCode',
            description: 'createTime',
          }"
          v-model="os"
          @change="osChange"
          :show-description="true"
        />
      </a-form-model-item>
    </a-form-model>
    <!-- 单选商品end -->
    

    <div style="height: 300px;margin-top:10px;">
      <lz-multiple-selector
        action="http://localhost:7001/api/brand/pc/brand/goods/online"
        :replaceFields="{
          title: 'goodsTitle',
          description: 'goodsCode,specName,unitName',
        }"
        v-model="ms"
        :show-description="false"
        @change="msChange"
      />
    </div>
    <lz-video
      baseUrl="https://echftp.yqzhfw.com"
      url="path"
      :data-list="videoDataList"
    ></lz-video>

    <!--        <a-button icon="profile" style="margin-right: 10px;">导入记录</a-button>-->
    <!--                <lz-upload-tools-->
    <!--                        @beforeUpload="beforeUpload"-->
    <!--                        @doneUpload="doneUpload"-->
    <!--                        label="导入"-->
    <!--                        :size="1"-->
    <!--                        accept=".xlsx,.xls"-->
    <!--                        action='http://localhost:8102/base/common/upload/image'-->
    <!--                />-->

    <!--        <lz-text color='error' :value='formData.ttt'></lz-text>-->
    <!--        <lz-text :value="lztext" color="primary" @click="textClick"></lz-text>-->

    <!--                         :asyncLoad="asyncLoad"
        -->
  
    

    

    <lz-image
      url="path"
      :data-list="dataList"
      width="100px"
      height="100px"
    ></lz-image>

    <!--        <test/>-->
    <!--        <lz-time-picker v-model="timePicker" @change="change"></lz-time-picker>-->
  

    <!--        <br/>-->
    <!--        <br/>-->
    <!--        <br/>-->
  </div>
</template>

<script>
import items from "./items";

export default {
  name: "App",
  components: {},
  data() {
    return {
     
      ms: [
        {
          cateCode: "10000000",
          cateName: "宠物护理/食品",
          cateType: 1,
          createTime: "2020-09-08 09:31",
          id: "1303143567715205120",
          lv: 1,
          lv1Id: "1303143567715205120",
          lv1Name: "宠物护理/食品",
          lv2Id: "",
          lv2Name: "",
          lv3Id: "",
          lv3Name: "",
          lv4Id: "",
          lv4Name: "",
          pid: "0",
          seq: 0,
          state: 1,
          updateTime: "2020-09-08 09:37",
        },
        {
          cateCode: "47000000",
          cateName: "清洁/卫生产品",
          cateType: 1,
          createTime: "2020-09-08 09:31",
          id: "1303143567878782976",
          lv: 1,
          lv1Id: "1303143567878782976",
          lv1Name: "清洁/卫生产品",
          lv2Id: "",
          lv2Name: "",
          lv3Id: "",
          lv3Name: "",
          lv4Id: "",
          lv4Name: "",
          pid: "0",
          seq: 1,
          state: 1,
          updateTime: "2020-09-08 09:37",
        },
      ],
      defaultFormData: {
        ttt: "123123",
      },
      formData: Object.assign({}, this.defaultFormData),
      lztext: "中华人民共和国万岁",
      items: items,
      timePicker: "10:10:10",
      
     
      b: "",
      dataList: [
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://echftp.yqzhfw.com/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          path:
            "https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1595555863&di=170ed927a6ae5b36f478e5b222d05816&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg",
        },
        {
          path:
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595565947814&di=88ad5be9f62cf469215501c5abe970a0&imgtype=0&src=http%3A%2F%2Fa4.att.hudong.com%2F22%2F59%2F19300001325156131228593878903.jpg",
        },
        {
          path:
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595565947814&di=88ad5be9f62cf469215501c5abe970a0&imgtype=0&src=http%3A%2F%2Fa4.att.hudong.com%2F22%2F59%2F19300001325156131228593878903.jpg",
        },
        {
          path:
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595565947814&di=88ad5be9f62cf469215501c5abe970a0&imgtype=0&src=http%3A%2F%2Fa4.att.hudong.com%2F22%2F59%2F19300001325156131228593878903.jpg",
        },
        {
          path:
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595565947814&di=88ad5be9f62cf469215501c5abe970a0&imgtype=0&src=http%3A%2F%2Fa4.att.hudong.com%2F22%2F59%2F19300001325156131228593878903.jpg",
        },
        {
          path:
            "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595565947814&di=88ad5be9f62cf469215501c5abe970a0&imgtype=0&src=http%3A%2F%2Fa4.att.hudong.com%2F22%2F59%2F19300001325156131228593878903.jpg",
        },
      ],
      videoDataList: [
        {
          name:
            "/opt/home/train/tmp/video/世界邮政日，来看小姐姐边“吐槽”边“点赞”.mp4",
          path: "/train/2020/10/13/f2e8a5d792fc45e7bd023d4007d0b72a.mp4",
        },
      ],
     
      treeData: [
        {
          title: "Node1",
          value: "0-0",
          key: "0-0",
          children: [
            {
              value: "0-0-1",
              key: "0-0-1",
              title: "title",
            },
            {
              title: "Child Node2",
              value: "0-0-2",
              key: "0-0-2",
            },
          ],
        },
        {
          title: "Node2",
          value: "0-1",
          key: "0-1",
        },
      ],
      os: null,
      // os: {
      //     cateCode: "10000000",
      //     cateName: "宠物护理/食品",
      //     cateType: 1,
      //     createTime: "2020-09-08 09:31",
      //     id: "1303143567715205120",
      //     lv: 1,
      //     lv1Id: "1303143567715205120",
      //     lv1Name: "宠物护理/食品",
      //     lv2Id: "",
      //     lv2Name: "",
      //     lv3Id: "",
      //     lv3Name: "",
      //     lv4Id: "",
      //     lv4Name: "",
      //     pid: "0",
      //     seq: 0,
      //     state: 1,
      //     updateTime: "2020-09-08 09:37",
      // },
    };
  },
  beforeCreate() {},
  watch: {
    chooseArddr(v) {
      console.log(v);
    },
  },
  created() {
    console.log(window.jQuery);
    setTimeout(() => {
      this.timePicker = "";
      this.datePicker = "";
      this.rangePicker = [];
      this.uploadList = [
        {
          name: "音频服务.png",
          path: "/basis/2020/7/10/13acde2b08e84fc7bae4e9c0195facfc.png",
        },
        {
          name: "视频.png",
          path: "/basis/2020/7/13/344671f59cb44dbda5e01df5e0fcfda5.png",
        },
      ];
      this.lztext = "嘻嘻嘻嘻嘻嘻嘻";
    }, 3000);
  },
  mounted() {
    // this.selectTreeInit();
    // this.treeInit();
    // setTimeout(() => {
    //     this.$refs.lzTree.refreshByPid("1308741694174265344");
    // }, 10000);
  },

  methods: {
    exportClick() {
      this.$refs.lzExportTools.exportExcel({ brandId: "1302877000083439616" });
    },
    osChange(v) {
      console.log(v);
      console.log(this.os);
    },
    
  
   
  
   
    textClick(val) {
      alert(val);
    },
    
    treeInit() {
      this.$refs.lzTree.init();
    },
    selectTreeInit() {
      // this.$refs.lzTreeSelect.init(this.treeData)

      this.$axios({
        url: "http://localhost:7001/center/pc/serve/goods/category/getTree",
        params: {},
      }).then((res) => {
        this.$refs.lzTreeSelect.init(res.data);
      });
    },
   
   
  
    t1() {
      console.log("a", this.a);
      console.log("b", this.b);
    },
   
    change(v) {
      console.log(v);
      console.log(this.timePicker);
    },
    msChange() {
      console.log(this.ms);
    },
    
  },
};
</script>

<style>
#app {
  padding: 0px 20px;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
